<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include.inc.jsp" %>
<form id="pagerForm" method="post" action="/client/client.action">
    <input type="hidden" name="status" value="${param.status}">
    <input type="hidden" name="keywords" value="${param.keywords}"/>
    <input type="hidden" name="pageNum" value="${pager.pageNumber}"/>
    <input type="hidden" name="numPerPage" value="${pager.pageSize}"/>
    <input type="hidden" name="orderField" value="${param.orderField}"/>
    <input type="hidden" name="pager.orderBy" value="id"/>
    <input type="hidden" name="pager.order" value="${pager.order}"/>

    <input type="hidden" name="pager.keyword" value="${pager.keyword}"/>
    <input type="hidden" name="pager.searchBy" value="clientName"/>
</form>


<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="/client/client.action" method="post">
        <div class="searchBar">
            <table class="searchContent" >
                <tr>
                    <td>
                        客户名称：<input type="text" name="pager.keyword" value="${pager.keyword}"/>
                        <input type="hidden" name="pager.searchBy" value="clientName"/>
                    </td>
                    <td>
                        <%--  建档日期：<input type="text" class="date" readonly="true"/>--%>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">检索</button>
                            </div>
                        </div>
                    </li>
                    <%--
             <li><a class="button" href="demo_page6.html" target="dialog" mask="true"
                    title="查询框"><span>高级检索</span></a></li>--%>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="/client/client!toAdd" target="dialog" title="用户添加" width="400" height="388"><span>添加</span></a>
            </li>
            <li><a class="delete" href="/client/client!delClientManager?clientManager.id={clientManager_user}"
                   target="ajaxTodo"
                   title="确定要删除吗?"><span>删除</span></a></li>
            <li><a class="edit" href="/client/client!toAdd?clientManager.id={clientManager_user}" target="dialog"
                   title="用户修改" rel="userNav"><span>修改</span></a></li>
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138" asc="asc" desc="desc">
        <thead>
        <tr>
            <th width="20" ></th>
            <th width="100" orderField="clientName" class="asc">客户姓名</th>
            <th width="100" orderField="clientTel">客户电话</th>
            <th width="50" orderField="clientSex">性别</th>
            <th width="100" orderField="clientSex">生日类型</th>
            <th width="80" orderField="clientBirthdateType">生日日期</th>
            <th width="80" orderField="clientEmail">邮件</th>
            <th width="auto" orderField="clientQQ">QQ</th>
            <th width="80" orderField="clientAddr">地址</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${pager.result}" var="user" varStatus="index">
            <tr target="clientManager_user" rel="${user.id}">
                <td>${index.index+1}</td>
                <td>${user.clientName}</td>
                <td>${user.clientTel}</td>
                <td>${user.clientSex}</td>
                <td>${user.clientBirthdateType}</td>
                <td>${user.clientBirthdate}</td>
                <td>${user.clientEmail}</td>
                <td>${user.clientQQ}</td>
                <td>${user.clientAddr}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
                <option value="20" <c:if test="${pager.pageSize==20}">selected="true" </c:if>>20</option>
                <option value="50" <c:if test="${pager.pageSize==50}">selected="true" </c:if>>50</option>
                <option value="100" <c:if test="${pager.pageSize==100}">selected="true" </c:if>>100</option>
                <option value="200" <c:if test="${pager.pageSize==200}">selected="true" </c:if>>200</option>
            </select>
            <span>条，共${pager.totalCount}条${pager.pageCount}</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="${pager.totalCount}" numPerPage="${pager.pageSize}"
             pageNumShown="12"
             currentPage="${pager.pageNumber}"></div>

    </div>
</div>
